package com.dst.service.impl;

import com.dst.dao.BookMapper;
import com.dst.entity.Book;
import com.dst.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("bookService")
public class BookServiceImpl implements BookService {
    @Autowired
    @Qualifier("bookMapper")
    private BookMapper bookMapper;
    @Override
    public List<Book> selectRecommend() {
        List<Book> books = bookMapper.selectRecommend();
        return books;
    }

    @Override
    public List<Book> selectHotSale() {
        return bookMapper.selectHotSale();
    }

    @Override
    public List<Book> selectJustIn() {
        return bookMapper.selectHotSale();
    }

    @Override
    public List<Book> selectNewBookSale() {
        return bookMapper.selectNewBookSale();
    }

    @Override
    public Book selectByName(String name) {
        return bookMapper.selectByName(name);
    }
}
